<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xsd ="http://www.w3.org/2001/XMLSchema#"
  xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:foaf="http://xmlns.com/foaf/0.1/"  
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<head>
	<title>dataset change watch-dog (DCW) - dady demo</title>

	<link media="all" href="dcw.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="jquery-1.3.2.js"></script>
	<script type="text/javascript" src="jquery.periodicalupdater.js"></script>
	<script type="text/javascript">

	$(function() {
		
		$("#go").click(function () {

			var URI = $("#URI").val();
			var serviceURI = "index.php";
			/*
			$.ajax({
				type: "GET",
				url: serviceURI,
				data: "void=" + URI,
				success: function(data){
					$("<div style='margin:10px'>"+ data + "</div>").appendTo("#out");
				},
				error:  function(msg){
					alert(data);
				} 
			});
			*/
			$.PeriodicalUpdater('index.php', {
				  method: 'get',          // method; get or post
				  data: {void: URI},               // array of values to be passed to the page - e.g. {name: "John", greeting: "hello"}
				  minTimeout: 1000,       // starting value for the timeout in milliseconds
				  maxTimeout: 8000,       // maximum length of time between requests
				  multiplier: 2,          // if set to 2, timerInterval will double each time the response hasn't changed (up to maxTimeout)
				  type: 'text'            // response type - text, xml, json, etc.  See $.ajax config options
				},
			function(data) {
			 	$("<div style='margin:10px'>"+ data + "</div>").appendTo("#out");
			});	
		
		});

	});
	</script>
</head>
<body>
<div id="head">
	<h1>dataset change watch-dog (DCW) - dady demo</h1>
	<p class="note">See <a href="http://www.linkeddatacamp.org/wiki/LinkedDataCampVienna2009/DatasetDynamics">Linked Data Camp 09</a> page for details ...</p>
</div>
<div id="main">	
		voiD URI: <input type="text" id="URI" value="http://localhost:8888/dady-demo/publisher/void.ttl" size="60" /><button id="go">watch</button>
</div>
<div id="out"></div>
</body>
</html>